package com.kenai.jbosh;

final class AttrCharsets extends AbstractAttr<String>
{
  private final String[] charsets;

  private AttrCharsets(String paramString)
  {
    super(paramString);
    this.charsets = paramString.split("\\ +");
  }

  static AttrCharsets createFromString(String paramString)
  {
    AttrCharsets localAttrCharsets;
    if (paramString == null)
      localAttrCharsets = null;
    while (true)
    {
      return localAttrCharsets;
      localAttrCharsets = new AttrCharsets(paramString);
    }
  }

  boolean isAccepted(String paramString)
  {
    String[] arrayOfString = this.charsets;
    int i = arrayOfString.length;
    int j = 0;
    while (true)
    {
      int k;
      if (j >= i)
        k = 0;
      while (true)
      {
        return k;
        if (!(arrayOfString[j].equalsIgnoreCase(paramString)))
          break;
        k = 1;
      }
      ++j;
    }
  }
}